<%@ page import="cn.itcast.domain.User" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.Map" %>
<%@ page import="java.util.HashMap" %><%--
  Created by IntelliJ IDEA.
  User: 17431
  Date: 2019/5/12
  Time: 20:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>获取对象数据</title>
</head>
<body>

<%
    User user=new User();
    user.setAge(23);
    user.setName("贺强");
    request.setAttribute("hello",user);

    List list=new ArrayList();
    list.add(10);
    list.add(20);
    list.add(30);
    request.setAttribute("jihe",list);

    Map map=new HashMap();
    map.put("name","zhangsan");
    map.put("gender","男");
    map.put("age","18");
    request.setAttribute("map",map);

%>
${requestScope.hello.name}<br>
${requestScope.hello.age}<br>

${requestScope.jihe[0]}
${requestScope.jihe[1]}
${requestScope.jihe[2]}
<hr>
${requestScope.map.name}
${requestScope.map.gender}
${requestScope.map.age}
</body>
</html>
